package com.hb.trans.mvp.ui.adapter

import com.basiclib.utils.DateUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.hb.trans.R
import com.hb.trans.bean.Evaluation
import javax.inject.Inject

class EvaluationAdapter(layoutResId: Int) : BaseQuickAdapter<Evaluation, BaseViewHolder>(layoutResId) {
    @Inject
    constructor() : this(R.layout.item_evaluation)

    override fun convert(helper: BaseViewHolder, item: Evaluation) {
        helper.setText(R.id.tvEvaluationContent, item.content)
            .setText(R.id.tvEvaluationTime, DateUtils.formatterTimestampTo(item.createdTime.toLong(), DateUtils.sf3))
    }
}